package threads;

import java.util.concurrent.ExecutionException;
import java.util.concurrent.ForkJoinPool;
import java.util.concurrent.RecursiveTask;

//此例为多线程框架编程的Fork-Join
public class ForkJoinTest {
    public static void main(String[] args)throws ExecutionException,InterruptedException
    {
        //创建共享线程池，即要执行的线程池
        ForkJoinPool fjp=new ForkJoinPool();//创建一个自动增长的线程池
       // ForkJoinPool fjp=new ForkJoinPool(4);//创建一个固定线程池
        //创建任务

        //提交任务

        //返回结果
    }
}
class SumTask extends RecursiveTask<Long>
{
    public Long compute()
    {
        long sum=100;
        return sum;
    }

}
